<template>
	<view class="main">
		<view class="aitem" style="margin-bottom: 1px;">
			<view class="aic">
				<view><text class="iconfont icon-gerenzhongxin-zhanghaoguanli" style="background-color: #F44336;"></text>{{cnObj.account}}</view>
				<view>{{account}}</view>
			</view>
		</view>
		<view class="aitem">
			<view class="aic" >
				<view><text class="iconfont icon-pipeizhiwei" style="background-color: #007AFF;"></text>{{cnObj.station}}</view>
				<view>{{station}}</view>
			</view>
		</view>
		<view class="aitem">
			<view class="aic" >
				<view><text class="iconfont icon-zhanghao" style="background-color: #FFC107;"></text>{{cnObj.username}}</view>
				<view>{{username}}</view>
			</view>
		</view>
		<view class="aitem">
			<view class="aic">
				<view><text class="iconfont icon-dianhua" style="background-color: #9b00ff;"></text>{{cnObj.telphone}}</view>
				<view>{{telphone}}</view>
			</view>
		</view>
		<!-- #ifdef APP-PLUS -->
		<view class="aitem">
			<view class="aic">
				<view><text class="iconfont icon-dianhua" style="background-color: #0b078f;"></text>{{cnObj.version}}</view>
				<view>{{version}}</view>
			</view>
		</view>
		<!-- #endif -->
		<view class="aitem">
			<view class="aic">
				<view><text class="iconfont icon-dianhua" style="background-color: #0b078f;"></text>{{cnObj.accountName}}</view>
				<view>{{accountName}}</view>
			</view>
		</view>
	</view>
</template>


<script>
	var util = require("../../utils/util.js");
	const app = getApp().globalData;
	export default {
		data() {
			return {
				account:'',
				station:'',
				username:'',
				accountName:'',
				telphone:'',
				version:'',
				enObj:{'account':'Account','station':'Station','username':'Username','accountName':'Account Set','telphone':'Telphone','version':'Version'},
				cnObj:{'account':'账号','station':'职位','username':'姓名','accountName':'账套','telphone':'电话','version':'版本号'}
			}
		},
		onLoad:function(options){
			var that = this
			this.station = '员工'
			let i18n = uni.getStorageSync('i18n')
			if(i18n === 'en' ){
				this.station = 'Staff'
				thi.cnObj = this.enObj
				uni.setNavigationBarTitle({title:'My account'})
			}
			this.account = uni.getStorageSync('accountid')
			this.username = uni.getStorageSync('userName')
			this.accountName = uni.getStorageSync('accountName')
			this.telphone = ''
			// #ifdef APP-PLUS
			plus.runtime.getProperty(plus.runtime.appid, function(widgetinfo) {
				that.version = widgetinfo.version
			})
			// #endif
				
		}
	}
</script>

<style>
	.main{width: 100vw;height: 100vh;background-color: #f0f0f0;}
	.aitem{width: 100%;padding: 0 10px; background-color: #fff;color: #666;}
	.aic{display: flex;justify-content: space-between;align-items: center;padding: 10px;margin-right:10px;}
	.iconfont{color: #fff;padding: 5px;font-size: 12px;margin-right: 10px; border-radius: 50%;}
</style>
